
import { _decorator, Camera, Component, director, instantiate, Node, Prefab, Vec3 } from 'cc';
import { EventLister } from '../utils/EventLister';
import { EventProtoCtrl } from '../utils/EventProtoCtrl';
import { CamreaCtrl } from './CamreraCtrl';
const { ccclass, property } = _decorator;

/**
 * Predefined variables
 * Name = GameCtrl
 * DateTime = Sat Feb 24 2024 15:43:54 GMT+0800 (中国标准时间)
 * Author = heyongtao
 * FileBasename = GameCtrl.ts
 * FileBasenameNoExtension = GameCtrl
 * URL = db://assets/scripts/game/GameCtrl.ts
 * ManualUrl = https://docs.cocos.com/creator/3.4/manual/zh/
 *
 */
 
@ccclass('GameCtrl')
export class GameCtrl extends Component {

    @property(Node)
    mapCamera : Node = null;
    @property(Node)
    player : Node = null;

    protected onLoad(): void {

        CamreaCtrl.GetInstance().initCamera(this.mapCamera,this.player);
    }

    start () {
        // [3]
    }

    update (deltaTime: number) {
    }
}

/**
 * [1] Class member could be defined like this.
 * [2] Use `property` decorator if your want the member to be serializable.
 * [3] Your initialization goes here.
 * [4] Your update function goes here.
 *
 * Learn more about scripting: https://docs.cocos.com/creator/3.4/manual/zh/scripting/
 * Learn more about CCClass: https://docs.cocos.com/creator/3.4/manual/zh/scripting/decorator.html
 * Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.4/manual/zh/scripting/life-cycle-callbacks.html
 */
